<include file="Public/head"/>
<!-- <link rel="stylesheet" href="__PUBLIC__/qwadmin/css/bootstrap.css"/> -->
<style>
.tble th{
    font-size:15px;
    color:#0099CC;
}



</style>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
               
            <input type="button"  value="导出excel" class=" btn-info"  style="float:left;border-radius:25px;width:100px;" onClick="return export_excel();"    /><span style="float:left; width:20px;height:100%;">&nbsp;</span>
            <button class="btn-info" style="width:100px;font-size:20px;" onclick="guan()">关闭勾餐</button>
            <div class="clearFloat">
               <!-- <hr style="margin-top:5%;">  <!--分割线--> 
                    <div class="row" id="ddd" style="margin-top:5%;">
                                <table class="table table-striped table-bordered table-hover tble" style="width:50%;margin:0px auto;">
                                    <thead>
                                    
                                    <tr>
                                        <!-- <th class="center"><input class="check-all" type="checkbox" value=""></th> -->
                                        <th class="center">套餐</th>
                                        <th class="center">所属部门</th>                                        
                                        <th class="center">职员名字</th>
                                        <!-- <th class="center">部门</th> -->
                                        <th class="center">时间</th>
                                       
                                        <th class="center">操作</th>
                                        
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <style>
                                        .grouptd {
                                            position: relative;
                                        }

                                        .group {
                                            display: inline-block;
                                            width: 100%;
                                        }

                                        .groupselect {
                                            position: absolute;
                                            top: 0;
                                            left: 0;
                                            width: 100%;
                                            height: 100%;
                                            border: 0;
                                        }
                                    </style>
                                    <volist name="ulist" id="val">
                                        <tr>
                                           

                                               
                                                <td class="center">{$val.cname}</td>
                                                <td class="center">{$val.ment}</td>
                                                <td class="center">{$val.uname}</td>
                                                <td class="center">{$val.time}</td>
                                                <!-- <td style="text-align:center;">{$val.email}</td> -->
                                                <td class="center">
                                                    <button  onclick="del({$val.id},this)" class="btn-danger">删除</button>
                                                </td>
                                            
                                            
                                            
                                            
                                        </tr>
                                    </volist>
                                    </tbody>
                                    
                                </table>
                           
                            {$page}
                        </div>






            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>

<script>
     //导出excel
    function export_excel(){
        location.href="{:U('Tong/z_export')}";
    }

    function del(id,obj)
    {
        //询问框
        layer.confirm('确定提交么 ( ・◇・)？', {
          btn: ['确定','取消'] //按钮
        }, function(){
             $.ajax({
                 type: "POST",
                 url:"{:U('del')}",
                 data:{"id":id},// 要提交的表单 
                 beforeSend:function(){
                       layer.load(0, {shade: false});
                    },
                 success: function(msg) {
                    // console.log(msg);
                    if (msg == 1111) {
                        layer.msg('刪除成功~', {icon: 1});
                        history.go(0); 
                    }else{
                        layer.msg('刪除失敗失败！', {icon: 2});
                    }
                 },
                 complete: function() {
                         layer.closeAll('loading');
                    }
             });
         
        }, function(){
            layer.msg(' (｡・`ω´･) 再见');
        });   
    }



function guan()
{
    //询问框
        layer.confirm('确定关闭今日勾餐么 ( ・◇・)？', {
          btn: ['确定','取消'] //按钮
        }, function(){
             $.ajax({
                 type: "POST",
                 url:"{:U('guan')}",
                 beforeSend:function(){
                       layer.load(0, {shade: false});
                    },
                 success: function(msg) {
                    // console.log(msg);
                    if (msg == 1111) {
                        layer.msg('关闭成功~', {icon: 1});
                        history.go(0); 
                    }else{
                        layer.msg('关闭失败', {icon: 2});
                    }
                 },
                 complete: function() {
                         layer.closeAll('loading');
                    }
             });
         
        }, function(){
            layer.msg(' (｡・`ω´･) 再见');
        });   
}

</script>



</body>
</html>
